{include file="public/header"/}

{include file="public/navleft"/}
<div id="vue_det">
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        快速复制系统已存在用户账号 权限
    </div>

    <ol class="am-breadcrumb">
        <li><a href="{:url('index/index')}" class="am-icon-home">首页</a></li>
        <li><a href="#">表单</a></li>
        <li class="am-active">复制用户表单</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                <span class="am-icon-code"></span> 表单
            </div>
            <div class="tpl-portlet-input tpl-fz-ml">
                <div class="portlet-input input-small input-inline">
                    <div class="input-icon right">
                        <i class="am-icon-search"></i>
                        <input type="text" class="form-control form-control-solid" placeholder="搜索..."> </div>
                </div>
            </div>


        </div>
        <div class="tpl-block ">
            <div class="am-g tpl-amazeui-form">
                <div class="am-u-sm-12 am-u-md-9">
                    <form class="am-form am-form-horizontal" method="post" action="{:url('user/copy')}">


                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">现有员工:/工号或姓名</label>
                            <div class="am-u-sm-9">
                                <input type="text" id="user-names" name="preuseorlogid" placeholder="现有员工姓名或者/工号">
                                <small>输入现有员工/工号或姓名</small>
                            </div>
                        </div>

                            <div class="am-form-group">
                              <label for="user-name" class="am-u-sm-3 am-form-label">新员工工号：/IDCard</label>
                             <div class="am-u-sm-9">
                                <input type="text" id="user-namess" name ="logid" placeholder="工号 / IDCard">
                                <small>输入新增员工工号**</small>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">新员工姓名:/ Name</label>
                                <div class="am-u-sm-9">
                                    <input  v-model="signName"  @blue="onBlueCreateSign" type="text" id="user-name" name = "username" placeholder="姓名/Name">
                                    <small>输入新增员工姓名**</small>
                                </div>
                            </div>
                        </div>






                        <div class="input_group">
                            <div class="input_group_left">
                        <div class="am-checkbox" >
                            <label>
                                <input type="checkbox"  name="login" checked> <font color="green">***自动登录哈子千麦web 生成记录***设置管理角色--用户管理</font>
                            </label>
                        </div>
                        <div class="am-checkbox" >
                            <label>
                                <input type="checkbox"  name="ywy" > <font color="#6495ed">***是否是业务人员***同步增加业务员</font>
                            </label>
                        </div>
                        <div class="am-checkbox" >
                            <label>
                                <input type="checkbox"  > ***是否同步增加昆涞账号***
                            </label>
                        </div>
                        <div class="am-checkbox" >
                            <label>
                                <input type="checkbox"  checked > ***同步生成电子艺术签名***
                            </label>
                        </div>
                            </div>
                            <div class="input_group_right">
                                <img :src="url">
                                <button @click="onCreateSign" type="button" class="layui-btn layui-btn-sm layui-btn-fluid">点击生成电子签名</button>
                                </div>
                        </div>


                         <div class="am-form-group"style="margin-top: 5%" >
                            <div class="am-u-sm-9 am-u-sm-push-6" style="margin-top: 5%">
                                <button type="submit" class="am-btn am-btn-primary">点击复制/增加</button>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>

    </div>
</div>

</div>
<style>url
    .input_group{

    }
    .input_group_left{
        float: left;
        background: ;
        margin-left: 15%;
    }
    .input_group_right{
        float: left;
        width: 30%;
        margin-left: 5%;
        height: 18%;
        color: gray;
    }
    .input_group_right img{
        border: mistyrose 1px solid;
    }
</style>



<script type="text/javascript">
    var vm = new Vue({
        el: '#vue_det',
        data: {
            signName: "",
            url: "__STATIC__/image/e2c1990d78744bf6a2897c8d0432e7bb.png"
        },
        methods: {
            onBlueCreateSign:function (){
                console.log(signName);
            },
            onCreateSign:function (){
                //var _this = this;
                if(this.signName == ''){
                    this.$message({message:'错了哦，***新员工姓名不能为空***不能为空！',center:true,type: 'error'});
                    return;
                    }
                axios.get('/index.php/index/Commapi/GetSignName', {
                    params: {
                        signName: this.signName
                    }
                }).then(
                        (response)=>{
                            if(response.data.data.status = 1)
                            this.url = response.data.data;
                            this.$message({message:'生成成功',center:true,type: 'success'});
                            console.log(response);
                        }
                    )
                    .catch(error => {
                        this.$message({
                            message: error.response.data.message ? error.response.data.message : '网络异常',
                            type: 'warning'
                        })
                    });
            }
        }
    })
</script>
{include file="public/footer"/}